package com.stylefeng.guns.core.common.constant.state;

/**
 * 股东性质
 *
 * @author fengshuonan
 * @Date 2017年1月10日 下午9:54:13
 */
public enum HsgtType {

    A(80601499, "深股通",3), B(80403915, "沪股通",1) ,C(80000000,"机构专用",0);

    int code;
    String name;
    int type;

    HsgtType(int code, String name,int type) {
        this.code = code;
        this.name = name;
        this.type = type;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }


    public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public static String valueOf(Integer value) {
        if (value == null) {
            return "";
        } else {
            for (HsgtType ms : HsgtType.values()) {
                if (ms.getCode() == value) {
                    return ms.getName();
                }
            }
            return "";
        }
    }
}
